import request from '@/utils/request';

/**
 *  首頁相关的接口
 */

/**
 *  首頁
 */
export function indexPageList(data) {
	return request({
		url: '/business/index/index',
		method: 'POST',
		data,
	});
}

/**
 *  获取包厢列表
 */
export function getRoomList(data) {
	return request({
		url: '/business/shop/roomlist',
		method: 'POST',
		data,
	});
}

/**
 *  获取店員列表
 */
export function getStaffList(data) {
	return request({
		url: '/business/user/getstaff',
		method: 'GET',
		data,
	});
}

/**
 *  添加、編輯店員
 */
export function setStaff(data) {
	return request({
		url: '/business/user/staffSend',
		method: 'POST',
		data,
	});
}

/**
 *  删除店員
 */
export function deleteStaff(data) {
	return request({
		url: '/business/user/staffSend',
		method: 'POST',
		data,
	});
}

/**
 *  添加、編輯卡券
 */
export function setTickets(data) {
	return request({
		url: '/business/coupon/couponSend',
		method: 'POST',
		data,
	});
}

/**
 *  获取店鋪或包厢列表列表
 */
export function getStoreOrRoomList(data) {
	return request({
		url: '/business/shop/getlist',
		method: 'get',
		data,
	});
}

/**
 *  获取卡券列表
 */
export function getTicketsList(data) {
	return request({
		url: '/business/coupon/index',
		method: 'get',
		data,
	});
}

// 獲取優惠卷列表
export function getCouponList(data) {
	return request({
		url: '/business/coupon/index',
		method: 'GET',
		data,
	});
}

// 添加、編輯卡卷
export function updateCouponSend(data) {
	return request({
		url: '/business/coupon/couponSend',
		method: 'POST',
		data,
	});
}

// 通過設備ID獲取店鋪
export function getEquipmentStoreByEqID(data) {
	return request({
		url: 'api/index/getEquipmentStore',
		method: 'POST',
		data
	})
}

// 發送驗證碼
export function getCode(data) {
	return request({
		url: '/api/login/code',
		method: 'POST',
		data
	})
}

// 會員註冊
export function userRegister(data) {
	return request({
		url: '/api/login/register',
		method: 'POST',
		data
	})
}